package cash_access;

import mware_lib.Skeleton;

public class AccountSkeleton extends Skeleton<Account> {
	public AccountSkeleton(Account object) {
		super(object);
	}

	@Override
	public Object callMethod(String method, Object[] args) throws Throwable {
		if (method.equals("deposit")) {
			object.deposit((Double) args[0]);
			return null;
		} else if (method.equals("getBalance")) {
			return object.getBalance();
		} else if (method.equals("withdraw")) {
			object.withdraw((Double) args[0]);
			return null;
		} else {
			return null;
			//throw new RemoteException("Unknown function.");
		}
	}

}
